 <script lang="ts">
import layout from "@views/layout/index.vue";
export default {
  name: "App",
  provide() {
    return {
      reload: this.reload,
    };
  },
  data() {
    return {
      isRouterAlive: true,
      ShowPage: false,
    };
  },
  created() {
    this.InitData();
  },
  methods: {
    //初始化获取数据
    InitData() {
      //这里调接口查询数据,查询到数据后设置ShowPage为true,开始渲染页面
      this.ShowPage = true;
    },
    reload() {
      this.isRouterAlive = false;
      this.$nextTick(() => {
        this.isRouterAlive = true;
      });
    },
  },
};
</script>

<template>
  <!-- <layout></layout> -->
  <!-- 路由匹配到的组件将渲染在这里 -->
  <router-view />
</template>

 <style lang="scss">
html {
  overflow-y: auto;
}
body {
  overflow: hidden;
}
#app {
  overflow: hidden;
  height: 100%;
}
</style>